package freezzz.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.*;

public class TimeLineEP implements EntryPoint {

    private FlowPanel eventsTimeline = new FlowPanel ();
    private TimeLine timeLine = new TimeLine ();

    public void onModuleLoad () {

        Button b = new Button ( "Left", new ClickListener() {
            public void onClick ( Widget sender ) {
                timeLine.scrollLeft ();
            }
        } );
        Button n = new Button ( "Right", new ClickListener() {
            public void onClick ( Widget sender ) {
                timeLine.scrollRight ();
            }
        } );


        // Page title
        Label titleLabel = new Label ( "Events Timeline for Freezzz" );
        titleLabel.setStyleName ( "title-label" );

        RootPanel.get ().add ( titleLabel );
        RootPanel.get ().add ( b );
        RootPanel.get ().add ( n );
        RootPanel.get ().add ( eventsTimeline );

        eventsTimeline.add ( timeLine );
    }
}
